<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
	      <p>下面是一个无序列表</p >
	      <ul id="List1">
	         <li>樱花</li>
	         <li>桂花</li>
	      </ul>
	      <button onclick="myFunc()">点击在“樱花”选项前增加一个“兰花”选项</button>
	  </body>
	<script>
	     function myFunc()
	    {
			var enode = document.createElement("li");
			var tnode = document.createTextNode("兰花");
			enode.appendChild(tnode);
			var onode=document.getElementById("List1").firstChild; <!-- children[0]也可以 -->
			document.getElementById("List1").insertBefore(enode,onode);
		}
	    </script>
</html>